package org.dftproject.gedcom.core;

import org.dftproject.genesis.data.genealogy.IEvent;
import org.dftproject.genesis.data.genealogy.IPerson;
import org.dftproject.genesis.data.genealogy.IRole;
import org.dftproject.genesis.data.impl.EntityImpl;

public class Role extends EntityImpl implements IRole {
	
	private final String type;
	private final IGedcom gedcom;
	private final String playerId;
	private final IEvent event;
	
	public Role(String type, IGedcom gedcom, String playerId, IEvent event) {
		this.type = type;
		this.gedcom = gedcom;
		this.playerId = playerId;
		this.event = event;
	}

	public IEvent getEvent() {
		return event;
	}

	public String getPlayerId() {
		return playerId;
	}

	public IPerson getPerson() {
		return gedcom.getPerson(playerId);
	}

	public String getType() {
		return type;
	}

}
